package com.dubious.interview.euler;

import static com.dubious.interview.euler.Utilities.findMax;

import java.util.List;

import org.joda.time.DateTime;

public class Problem3 {

    /**
     * The prime factors of 13195 are 5, 7, 13 and 29.
     * 
     * What is the largest prime factor of the number 600851475143 ?
     * 
     * @param args
     */
    public static void main(String[] args) {
        System.out.println("Start Time: " + new DateTime());

        Long value = 600851475143L;
        List<Long> primeFactors = Utilities.primeFactorize(value);
        System.out.println("All factors: " + primeFactors);
        System.out.println("Largest prime factor of " + value + " is " + findMax(primeFactors));

        System.out.println("End Time: " + new DateTime());
    }

}
